package jin.si.com.suo;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @description:
 * @ClassName TestMtRunnable
 * @Author MT
 * @Date 2021/7/4 14:21
 **/
public class TestMtRunnable2 {

    public static void main(String[] args) throws Exception {

        MyRunnable2 m=new MyRunnable2();

        //线程池
        ExecutorService service=Executors.newFixedThreadPool(2);
        service.submit(m);
        service.submit(m);
        service.submit(m);



        //线程组
        /*ThreadGroup g=new ThreadGroup("r06");
        Thread t1=new Thread(g,m);
        Thread t2=new Thread(g,m);
        Thread t3=new Thread(g,m);

        t1.start();
        t2.start();
        t3.start();
        Thread.sleep(10);
        g.stop();*/


    }

}
